//
//  StatisticsGoodsTableViewCell.swift
//  ZNZXSuperMarket
//
//  Created by 四川中农 on 2018/8/6.
//  Copyright © 2018年 四川中农. All rights reserved.
//

import UIKit

class StatisticsGoodsTableViewCell: UITableViewCell {
    @IBOutlet weak var viewLine: UIView!
    @IBOutlet weak var goodsName: UILabel!
    @IBOutlet weak var goodsImage: UIImageView!
    @IBOutlet weak var totalSpec: UILabel!
    @IBOutlet weak var totalPrice: UILabel!
    
    override func awakeFromNib() {
        super.awakeFromNib()
        // Initialization code
    }

    override func setSelected(_ selected: Bool, animated: Bool) {
        super.setSelected(selected, animated: animated)

        // Configure the view for the selected state
    }
    
    func reload(WithModel model:ListModel){
        self.goodsImage.my_setImage(url: (model.goods?.img)!, placeholder: Api.placeHolder.rawValue)
        self.goodsName.text = model.goods?.name
        self.totalSpec.text = "本月累计采购：\(model.num)" + (model.goods?.spec)!
        self.totalPrice.text = "本月累计采购金额：\(model.price)元"
    }

}
